//
//  UILable+Extension.swift
//  阿酷微博
//
//  Created by co on 16/3/13.
//  Copyright © 2016年 王南侠. All rights reserved.
//

import UIKit

extension UILabel {

    /// 创建Lable
    ///
    /// - parameter text:      text
    /// - parameter fountSize: fountSize 默认14
    /// - parameter color:     color 默认dargcolor
    /// - parameter aligment:  aligment 默认左对齐
    ///
    /// - returns: UIlable
    convenience init(
        cz_text text: String,
        fountSize:CGFloat = 14,
        color: UIColor = UIColor.darkGrayColor(),
        aligment: NSTextAlignment = .Left){
            
            self.init()
            
            self.text = text
            self.textColor = color
            self.font = UIFont.systemFontOfSize(fountSize)
            self.textAlignment = aligment
            
            self.numberOfLines = 0
            
            // 自动调整大小
            sizeToFit()
    }
    
}
